import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex);

let state = {
    buys : []
}

let mutations = {
    toCar(state,p){
        //state.buys.push(p)
        //state.buys[p.productPromo.advWords] = p;
        state.buys.push(p)
        console.log(state)
    }
}
let getters = {
   
}
export default new Vuex.Store({
    state,
    mutations,
    getters
})
